package org.gd.hellojaxb.privat24.users;

import org.gd.hellojaxb.utils.Marshall;
import org.gd.hellojaxb.utils.MarshallProperties;

import javax.xml.bind.JAXBException;
import javax.xml.bind.annotation.*;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

/**
 * @author Gorhover
 */
@XmlRootElement(name = "users")
@XmlAccessorType(XmlAccessType.NONE)
@XmlAccessorOrder(XmlAccessOrder.ALPHABETICAL)
@SuppressWarnings("unused")
public class SUsers extends ArrayList<SUser> implements List<SUser> {

    public SUsers() {
        super();
        add(new SUser());
        add(new SUser());
    }

    @XmlElement(name = "user", required = true)
    @SuppressWarnings("unused")
    private SUsers getThis() {
        return this;
    }

    public static void main(String...str) throws JAXBException, IOException {
        System.out.println(Marshall.getInstance().marshal(
                new SUsers(),
                MarshallProperties.FORMATTED_OUTPUT));
    }

}
